<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
    
               <div>
               <h2>
                   <a href="http://www.baidu.com">
              <span id="se">
                 {{day}}
                 {{num}}
                </span>
                   </a>
               </h2>
               </div>

             <script>
           
              var se =  new Vue({
                 el:"#se",
                 data:{

                times:[],
                num:5
            },
              methods:{
                get()
                {
            //   alert("dd")
                    this.num--;
                    if(this.num<=0)
                    {

                        clearInterval(this.times);
                        location.href="http://www.baidu.com";
                    }
                }
              },
              mounted(){
                  this.times= setInterval(() => {
                    this.get(); 
                 }, 1000)
              }
              })


             </script>

</body>
</html>